package com.jade.store.wechat.biz.service.menu;

import com.jade.store.wechat.biz.common.WxConstantUtil;
import com.jade.store.wechat.biz.protocol.account.QrcodeCreatePermanentReq;
import com.jade.store.wechat.biz.protocol.menu.MenuCreateReq;
import com.jade.store.wechat.biz.protocol.menu.MenuCreateRes;
import com.jade.store.wechat.biz.service.BaseWxService;

/**
 * Created with IntelliJ IDEA.
 * User: jinya
 * Date: 2016/12/31
 * Time: 17:40
 * TEL :17701640710   MAIL:2009_jinya@163.com
 * To change this template use File | Settings | File Templates.
 */
public class MenuCreateService extends BaseWxService {
    public MenuCreateService(String appid) throws IllegalAccessException, InstantiationException, ClassNotFoundException {
        super(appid, WxConstantUtil.api_menu_create);
    }
    /**
     *
     * @param req 这个数据对象里面包含了API要求提交的各种数据字段
     * @return API返回的数据
     * @throws Exception
     */
    public String request(MenuCreateReq req) throws Exception {
        //--------------------------------------------------------------------
        //发送HTTPS的Post请求到API地址
        //--------------------------------------------------------------------
        String responseString = sendJsonPost(req);
        return responseString;
    }
}
